package com.chm.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class GlobalExceptionHandler {
	
	
	@ResponseBody
	@ExceptionHandler(RuntimeException.class)
	public Map<String,String> RunExceptionHandler(){
		Map<String,String> result = new HashMap<>();
		result.put("state", "500");
		result.put("msg", "系统异常，请稍后重试！");
		return result ;
		
	}

}
